/**
 *
 */
package cn.dw.dg.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.dw.dg.mapper.RoleMapper;
import cn.dw.dg.model.Role;
import cn.dw.dg.service.RoleService;

/**
 * @author aubrey
 * @date  下午3:07:29
 * roleServiceImpl
 */
@Service
public class RoleServiceImpl  implements RoleService{

	@Autowired
	private RoleMapper roleMapper;
	
	
	@Override
	@Transactional
	public void add(Role role) {
		roleMapper.add(role);
		role.setName("Transactional");
		roleMapper.add(role);
	}

	@Override
	public void update(Role role) {
		roleMapper.update(role);
	}

	@Override
	public List<Role> select(Role role) {
		return roleMapper.select(role);
	}

	@Override
	public void delete(Role role) {
		roleMapper.delete(role);
	}
	
	
}
